package com.ruoyi.supplier.controller;

import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.supplier.service.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/supplier/businessNumber")
public class BusinessNumberController {



    @Autowired
    private ITbPurchaseService tbPurchaseService;

    @Autowired
    private ITbStoreInService tbStoreInService;

    @Autowired
    private ITbStoreOutService tbStoreOutService;

    @Autowired
    private ITbStoreShelfService tbStoreShelfService;

    @Autowired
    private ITbOrderService tbOrderService;

    @Autowired
    private ITbCheckProductService tbCheckProductService;


    /**
     * 生成采购单号
     * @return
     */
    @GetMapping("/generatePurchaseNumber")
    public AjaxResult generatePurchaseNumber(){
        return AjaxResult.success(tbPurchaseService.selectNumber());
    }

    /**
     * 入库单号
     * @return
     */
    @GetMapping("/generateStoreInNumber")
    public AjaxResult generateStoreInNumber(){
        return AjaxResult.success(tbStoreInService.selectNumber());
    }

    /**
     * 出库单号
     * @return
     */
    @GetMapping("/generateStoreOutNumber")
    public AjaxResult generateStoreOutNumber(){
        return AjaxResult.success(tbStoreOutService.selectNumber());
    }

    /**
     * 盘点单号
     * @return
     */
    @GetMapping("/generateStoreShelfNumber")
    public AjaxResult generateStoreShelfNumber(){
        return AjaxResult.success(tbStoreShelfService.selectNumber());
    }

    /**
     * 生成
     * @return
     */
    @GetMapping("/generateCheckNumber")
    public AjaxResult generateCheckNumber(){
        return AjaxResult.success(tbCheckProductService.selectNumber());
    }

}
